package com.itlin.bean;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JacksonInject;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 员工信息表
 */
@Data
public class Employee implements Serializable {

    private static final long serialVersionUID = 1L;

    //1. 主键id
    // @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    //2. 员工姓名
    private String username;

    //3. 用户名
    private String name;

    //4. 密码
    private String password;

    // 5. 手机号
    private String phone;

    // 6. 性别
    private String sex;

    // 7. 身份证
    private String idNumber;

    // 8. 状态：0禁用，1正常
    private Integer status;

    // 9. 创建时间
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    // 10. 更新时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    // 11. 创建人
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;

    // 12. 修改人
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;

    @Override
    public String toString() {
        return "Employee{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", name='" + name + '\'' +
                ", password='" + password + '\'' +
                ", phone='" + phone + '\'' +
                ", sex='" + sex + '\'' +
                ", idNumber='" + idNumber + '\'' +
                ", status=" + status +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", createUser=" + createUser +
                ", updateUser=" + updateUser +
                '}';
    }
}
